package br.com.fiap.test;

import javax.swing.*;

/**
 * Created with IntelliJ IDEA.
 * User: gabriel.medina
 * Date: 21/09/12
 * Time: 12:13
 * To change this template use File | Settings | File Templates.
 */
public class Info extends JFrame {

    public Info() {
        initComponents();
    }


    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">
    private void initComponents() {

        ImageIcon img = new ImageIcon("src/imagens/Fiap2.jpeg");
        ImageIcon imgIcon = new ImageIcon("src/imagens/fiap.gif");
        this.setIconImage(imgIcon.getImage());
        this.setTitle("Rede - Social");
        this.setResizable(false);


        jpInit = new javax.swing.JPanel();
        jpCalculo = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        txtPartida = new javax.swing.JTextField();
        txtDestino = new javax.swing.JTextField();
        btnCalcular = new javax.swing.JButton();
        cbCalculo = new javax.swing.JComboBox();
        jLabel3 = new javax.swing.JLabel();
        txtDistancia = new javax.swing.JTextField();
        jpLog = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        txtLog = new javax.swing.JTextArea();
        jpGrafo = new javax.swing.JPanel();

        jpInit.setBorder(javax.swing.BorderFactory.createTitledBorder(""));

        jpCalculo.setBorder(javax.swing.BorderFactory.createTitledBorder("Cálculo"));

        jLabel1.setText("Partida: ");

        jLabel2.setText("Destino: ");

        btnCalcular.setText("Calcular");

        cbCalculo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cbCalculoActionPerformed(evt);
            }
        });

        jLabel3.setText("Distância: ");

        javax.swing.GroupLayout jpCalculoLayout = new javax.swing.GroupLayout(jpCalculo);
        jpCalculo.setLayout(jpCalculoLayout);
        jpCalculoLayout.setHorizontalGroup(
                jpCalculoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jpCalculoLayout.createSequentialGroup()
                                .addContainerGap()
                                .addGroup(jpCalculoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addComponent(cbCalculo, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                        .addGroup(jpCalculoLayout.createSequentialGroup()
                                                .addGroup(jpCalculoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                        .addComponent(jLabel1)
                                                        .addComponent(jLabel2))
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                .addGroup(jpCalculoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                        .addComponent(txtPartida)
                                                        .addComponent(txtDestino)))
                                        .addGroup(jpCalculoLayout.createSequentialGroup()
                                                .addComponent(jLabel3)
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                .addComponent(txtDistancia, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 18, Short.MAX_VALUE)
                                                .addComponent(btnCalcular)))
                                .addContainerGap())
        );
        jpCalculoLayout.setVerticalGroup(
                jpCalculoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jpCalculoLayout.createSequentialGroup()
                                .addGroup(jpCalculoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                        .addComponent(jLabel1)
                                        .addComponent(txtPartida, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(jpCalculoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                        .addComponent(jLabel2)
                                        .addComponent(txtDestino, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(cbCalculo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(jpCalculoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                        .addComponent(jLabel3)
                                        .addComponent(txtDistancia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addComponent(btnCalcular)))
        );

        jpLog.setBorder(javax.swing.BorderFactory.createTitledBorder("Log"));

        txtLog.setColumns(20);
        txtLog.setRows(5);
        txtLog.setEnabled(false);
        jScrollPane1.setViewportView(txtLog);

        javax.swing.GroupLayout jpLogLayout = new javax.swing.GroupLayout(jpLog);
        jpLog.setLayout(jpLogLayout);
        jpLogLayout.setHorizontalGroup(
                jpLogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(jScrollPane1)
        );
        jpLogLayout.setVerticalGroup(
                jpLogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(jScrollPane1)
        );

        javax.swing.GroupLayout jpInitLayout = new javax.swing.GroupLayout(jpInit);
        jpInit.setLayout(jpInitLayout);
        jpInitLayout.setHorizontalGroup(
                jpInitLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jpInitLayout.createSequentialGroup()
                                .addComponent(jpCalculo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jpLog, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jpInitLayout.setVerticalGroup(
                jpInitLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(jpCalculo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jpLog, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        jpGrafo.setBorder(javax.swing.BorderFactory.createTitledBorder("Grafo"));

        javax.swing.GroupLayout jpGrafoLayout = new javax.swing.GroupLayout(jpGrafo);
        jpGrafo.setLayout(jpGrafoLayout);
        jpGrafoLayout.setHorizontalGroup(
                jpGrafoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGap(0, 754, Short.MAX_VALUE)
        );
        jpGrafoLayout.setVerticalGroup(
                jpGrafoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGap(0, 394, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(jpInit, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jpGrafo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(layout.createSequentialGroup()
                                .addComponent(jpInit, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jpGrafo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
        );
    }// </editor-fold>

    private void cbCalculoActionPerformed(java.awt.event.ActionEvent evt) {
        // TODO add your handling code here:
    }

    // Variables declaration - do not modify
    private javax.swing.JButton btnCalcular;
    private javax.swing.JComboBox cbCalculo;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JPanel jpCalculo;
    private javax.swing.JPanel jpGrafo;
    private javax.swing.JPanel jpInit;
    private javax.swing.JPanel jpLog;
    private javax.swing.JTextField txtDestino;
    private javax.swing.JTextField txtDistancia;
    private javax.swing.JTextArea txtLog;
    private javax.swing.JTextField txtPartida;
    // End of variables declaration
}

